import random


class BH3PetPool:
    PET = 1
    FRE = 2
    OTHER = 3

    def next(self):
        r = random.random()
        if r < 0.0151:
            return BH3PetPool.PET
        elif r < 0.0151 + 0.1223:
            return BH3PetPool.FRE
        else:
            return BH3PetPool.OTHER
